<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>新增自营商品</title>
    <link rel="stylesheet" href="../static/lib/layui/css/layui.css">
    <link rel="stylesheet" href="../static/css/base/base.css">
    <link rel="stylesheet" href="../static/css/components/add-article.css">
    <link rel="stylesheet" href="../static/ueditor/themes/default/css/umeditor.css">
    <link rel="stylesheet" href="../static/css/components/active.css">
    <link rel="stylesheet" href="../static/css/components/addpro.css">

</head>

<body>
    <ul class="layui-nav" lay-filter="">
        <li class="layui-nav-item">
            <a href="">logo</a>
        </li>
        <li class="layui-nav-item  ">
            <a href="../index.html">文章管理</a>
        </li>
        <li class="layui-nav-item ">
            <a href="../activity/active.html">活动管理</a>
        </li>
        <li class="layui-nav-item ">
            <a href="../tea/tea.html">茶馆管理</a>
        </li>
        <li class="layui-nav-item">
            <a href="../collection/collection.html">藏家行情</a>
        </li>
        <li class="layui-nav-item layui-this">
            <a href="">自营商品</a>
        </li>
        <li class="layui-nav-item">
            <a href="javascript:;">banner管理</a>
        </li>
        <li class="layui-nav-item">
            <a href="">运营指标</a>
        </li>
        <!-- 头部右侧 -->
        <div class="header-right">
            <div class="help">
                <i class="layui-icon layui-icon-help ic-help" style="font-size: 6px; "></i>
            </div>
            <li class="layui-nav-item">
                <a href="">帮助</a>
            </li>
            <li class="layui-nav-item">
                <a href="">
                    <img src="http://t.cn/RCzsdCq" class="layui-nav-img">我</a>
            </li>
        </div>
    </ul>

    <!-- 面包屑 -->
    <div class="breadcrumb">
        <span class="layui-breadcrumb" lay-separator=">">
            <a href="tea.html">自营商品</a>
            <a href="add-tea.html">商品列表</a>
        </span>
    </div>


    <!-- 中间内容区 -->
    <div class="container">
        <div class="con-left fl">
            <ul class="layui-nav layui-nav-tree" lay-filter="test">
                <li class="layui-nav-item layui-nav-itemed">
                    <a href="tea.html">商品列表</a>
                    <dl class="layui-nav-child">
                        <dd>
                            <a href="tea.html">新增商品</a>
                        </dd>
                    </dl>
                </li>
            </ul>
        </div>
        <!-- 中间区域右侧 -->
        <div class="con-right fr">
            <!-- 文章标题 -->
            <form class="layui-form add-form" action="">
                <div class="layui-form-item">
                    <div class="layui-input-block">
                        <label class="layui-form-label">商品名称：</label>
                        <input type="text" name="title" required lay-verify="required" placeholder="请输入..." autocomplete="off" class="layui-input">
                    </div>
                </div>

                <div class="layui-form-item">
                    <div class="layui-input-block price">
                        <label class="layui-form-label">原价：</label>
                        <input type="text" name="title" required lay-verify="required" placeholder="请输入..." autocomplete="off" class="layui-input">
                        <span class="example">例如：312元/件</span>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-input-block price">
                        <label class="layui-form-label">优惠价：</label>
                        <input type="text" name="title" required lay-verify="required" placeholder="请输入..." autocomplete="off" class="layui-input">
                        <span class="example">例如：312元/件</span>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-input-block">
                        <label class="layui-form-label">商品封面：</label>
                        <div class="layui-upload-drag" id="upload">
                            <i class="layui-icon"></i>
                            <p>请上传商品封面</p>
                        </div>
                    </div>
                </div>
                <!-- 活动详情 -->
                <div class="layui-form-item">
                    <div class="layui-input-block">
                        <label class="layui-form-label">商品详情：</label>
                        <!-- 编辑器 -->
                        <textarea id="edit-text"></textarea>
                    </div>
                </div>

                <div class="layui-form-item">

                    <div class="layui-input-block">
                        <label class="layui-form-label open">上架</label>
                        <input type="checkbox" name="switch" lay-skin="switch">
                    </div>
                </div>

                <div class="layui-form-item save">
                    <div class="layui-input-block">
                        <button class="layui-btn preview" lay-submit lay-filter="formDemo">预览</button>
                        <button class="layui-btn preview" lay-submit lay-filter="formDemo">保存</button>
                    </div>
                </div>
            </form>


        </div>



        <script src="../static/lib/layui/layui.all.js"></script>
        <script src="../static/ueditor/jquery.js"></script>
        <script src="../static/ueditor/umeditor.config.js"></script>
        <script src="../static/ueditor/umeditor.js"></script>
        <script src="../static/ueditor/lang/zh-cn/zh-cn.js"></script>


        <script>
            ; !function () {
                //无需再执行layui.use()方法加载模块，直接使用即可
                var form = layui.form
                    , layer = layui.layer;
                form.on('submit(formDemo)', function (data) {
                    layer.msg(JSON.stringify(data.field));
                    return false;
                });

                // 日期
                var laydate = layui.laydate;
                laydate.render({
                    elem: '#date1'
                    , value: '1989-10-14'
                    , isInitValue: true
                });
                laydate.render({
                    elem: '#date2'
                    , value: '1989-10-14 00:00:00'
                    , type: 'datetime'
                });
                laydate.render({
                    elem: '#date3'
                    , value: '1989-10-14 00:00:00'
                    , type: 'datetime'
                });
                // 上传文件
                var $ = layui.jquery
                    , upload = layui.upload;
                upload.render({
                    elem: '#upload'
                    , url: '/upload/'
                    , done: function (res) {
                        console.log(res)
                    }
                });

                var um = UM.getEditor('edit-text', {
                    initialFrameWidth: 800,
                    initialFrameHeight: 250,
                    initialContent: '内容'
                });
            }();


        </script>





</body>

</html>